home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
vol_400
/
420_01
/
coerce.doc
< prev
next >
Wrap
Text File
|
1994-04-09
|
5KB
|
143 lines
Subject: Re: coerce
Date: Thu, 24 Feb 94 01:07:00 +0900
From: Tatsuro Sekiguchi <cocoa@is.s.u-tokyo.ac.jp>
Dear Mr. Volkman,
Thank you for your attention to my software. I am delighted to accept
your request that coerce would be added to CUG Library. It is my
pleasure that my software can serve many programmers.
But I have had a slightly strange feeling when I received your letter
since the most part of graphic formats that coerce can handle are used
mainly in Japan. I don't know how popular `mag' or `pic' formats are
out of Japan.
Anyway, it has no influence on my decision. I am enclosing an
English version of the README file. I will appreciate any suggestions
or comments. Thanks.
--
Tatsurou Sekiguchi,
Department of Information Science,
Faculty of Science, University of Tokyo, Japan
Email: cocoa@is.s.u-tokyo.ac.jp
----------------------------------------------------------------------
$ Revision: 1.00(English) $
coerce
------
Coerce is a program for converting graphic formats mutually used in
many Japanese BBS. To put it more precisely, it converts from one of
mag,pi,pic,maki,ppm,pbm,ml1, and beta formats to one of
mag,pi,pic,ppm, and beta formats.
`Beta format' is an inner representation of graphic images in coerce,
which is very similar to VRAM images of X68000(SHARP) or
FM-TOWNS(Fujitsu). The format is often used for debugging. `Coerce'
is aimed to accelerate traffic of graphic images between BBS and
Internet.
Environment
-----------
I verified that coerce worked correctly under the following
environment:
Sun's workstations(SS1,SS1+,SS2,SS10) & SunOS 4.1.1/3 & gcc 2.4.5
ANSI C is needed to build this package. The initial Makefile uses
`gcc'. I also packed a simple image viewer on X Window System in this
package, which requires C++ to be compiled. I have been reported that
coerce was complied successfully in MIPS & RISC/os 5.01 & gcc.
Files
-----
This package includes:
Beta.c Maki.c Pic.h
Beta.h Maki.h coerce.c
ML1.c PPM.c common.c
ML1.h PPM.h defs.h
Mag.c Pi.c ximage.cc
Mag.h Pi.h mkmains.c
Makefile Pic.c readme
Building
--------
Only typing `make' is enough to compile all programs when you are in
one of the above or similar environments. If it succeeds, it creates
pictomag pictopi pictoppm magtopic magtopi magtoppm makitopic makitomag
makitopi makitoppm pitopic pitomag pitoppm ml1topic ml1tomag ml1topi
ml1toppm ppmtopic ppmtomag ppmtopi pbmtopic pbmtomag pbmtopi
coerce ximage
Examples
--------
Commands like `**to**' can be used as the same way as ones of pbmplus
package. For instance, `magtopic' converts a `mag' format image
`foo.mag' to a `pic' format one when you type as follows:
% magtopic < foo.mag > foo.pic
`coerce' is a synthesis of all converters, which can be used as an
alternative of each converter. For instance, in order to convert
`mag' format to `pic' format, type
% coerce -mag +pic foo.mag
Options of coerce:
-{mag,pi,pic,maki,ppm,pbm,ml1,beta} specify the format of input images.
+{mag,pi,pic,ppm,beta} specify the format of output images.
-notadjust prevents adjusting an aspect ratio of pixels for `pic'
format images.
-stdin indicates an input image is read from standard input.
-stdout indicates the result is sent to standard output.
-o [name] specified the output file name.
-quiet prevents messages from being written.
Options of ximage:
-display [host] specifies the X server to connect.
-geometry [geometry] specified the preferred position and size.
-root indicates that the image is put on the root window.
-monochrome forces the image to be displayed in monochrome.
-diffusion indicates to reduce colors in error diffusion method.
-times [real] specifies an expansion or compression factor for the image.
-notadjust prevents adjusting an aspect ratio of pixels for `pic'
format images.
-xscale [real] specifies an expansion or compression factor for the
image along X-axis.
-yscale [real] specifies an expansion or compression factor for the
image along Y-axis.
-full forces the image to expand up to the whole screen.
Porting
-------
Porting to other environments and other machines is welcomed. Any
trial to incorporate new facility to save/load another format images
is also welcomed. There is already a patch for `xv' which enables to
load `mag' and `pic' format images. I think it is an interesting
attempt to combine `coerce' with `xv'.
License
-------
`coerce' includes a part of source files of PiFM ver 0.16 which was
written Takashi Nawashiro(PC-VAN PMH97000,NIFTY-Serve MAG03213). It is
permitted by the document for me to use and redistribute it. I waive
the copyright on this software. You can use/modify/redistribute this
package freely, even for commercial purpose. I have no responsibility
on any result caused by this software.
Acknowledge
-----------
I would like to thank Mr. Takashi Nawashiro who was kind enough to
permit me to use and redistribute a part of source codes of PiFM. I
also thank Mr. Hiramoto who tested `coerce' on MIPS.
Author
------
`coerce' was programmed by Tatsurou Sekiguchi.
Email: cocoa@is.s.u-tokyo.ac.jp
----------------------------------------------------------------------